package snowflake

import "github.com/bwmarrin/snowflake"

type Snowflake struct {
	node *snowflake.Node
}

func NewSnowflake(nodeId int64) *Snowflake {
	node, _ := snowflake.NewNode(nodeId)
	return &Snowflake{
		node: node,
	}
}

func (s *Snowflake) GenerateInt64() int64 {
	return s.node.Generate().Int64()
}

func (s *Snowflake) GenerateString() string {
	return s.node.Generate().String()
}

func (s *Snowflake) GenerateBase64() string {
	return s.node.Generate().Base64()
}
